package com.lct.d14_extends_field;

public class Test {
    public static void main(String[] args) {
        //目标：继承后，子类访问成员的特点，就近原则
        Zi zi = new Zi();
        zi.showName();
    }
}


class Zi extends Fu{
    String name = "子类名称";

    public void showName(){
        String name = "局部名称";
        System.out.println(name);  //局部变量
        System.out.println(this.name); //对象变量
	    System.out.println(super.name); //父类
    }
}

class Fu{
    String name = "父类名称";
}